package com.sanyang.logistics.sch.handler;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sanyang.logistics.pojo.DriverDim;
import com.sanyang.logistics.pojo.OrderStatus;
import com.sanyang.logistics.pojo.OwnerTypeDim;
import com.sanyang.logistics.pojo.Sysorders;
import com.sanyang.logistics.pojo.ThirdParty;
import com.sanyang.logistics.pojo.TruckDim;
import com.sanyang.logistics.sch.service.SysorderService;

@Controller
@RequestMapping("/sysorder")
public class SysorderHandler {
	
	@Autowired
	private SysorderService service;
	
	@RequestMapping("/sysorderall")
	@ResponseBody
	public Object sysorderall(Sysorders sysorders) {
		List<Sysorders> sysorderall = service.sysorderall(sysorders);
		return sysorderall;
	}
	
	@RequestMapping("/sysorderdele")
	@ResponseBody
	public String sysorderdele(Integer oid) {
		service.sysorderdele(oid);
		return "de";
	}
	
	
	@RequestMapping("/order_statusall")
	@ResponseBody
	public Object order_statusall() {
		List<OrderStatus> order_statusall = service.order_statusall();
		return order_statusall;
	}
	
	
	@RequestMapping("/truck_dimall")
	@ResponseBody
	public Object truck_dimall(TruckDim truckDim) {
		List<TruckDim> truck_dimall = service.truck_dimall(truckDim);
		System.out.println(truck_dimall+"123");
		return truck_dimall;		
	}
	
	
	@RequestMapping("/driver_dimall")
	@ResponseBody
	public Object driver_dimall(DriverDim driverDim) {
		List<DriverDim> driver_dimall = service.driver_dimall(driverDim);
		return driver_dimall;
	}
	
	@RequestMapping("/thirdpartyall")
	@ResponseBody
	public Object thirdpartyall( ThirdParty thirdParty) {
		List<ThirdParty> thirdpartyall = service.thirdpartyall(thirdParty);
		return thirdpartyall;
	}
	
	
	@RequestMapping("/owner_type_dimall")
	@ResponseBody
	public Object owner_type_dimall(OwnerTypeDim ownerTypeDim) {
		List<OwnerTypeDim> owner_type_dimall = service.owner_type_dimall();
		return owner_type_dimall;
	}
	
	
	
	
	

}
